#ifndef     __WORK_TASK_H
#define     __WORK_TASK_H

#include "../rtos/thread.h"
#include "../utils/object.h"
#include "../utils/byte_view.h"

namespace task {

class WorkTask_t : public rtos::Thread_t<WorkTask_t, 2048, osPriorityHigh3> {

public:
    void run();

    void exec(const utils::ByteView_t &bw);
    bool pre_proc(const utils::ByteView_t &bw);

    void delivery(const utils::ByteView_t &bw);
    void set_price(const utils::ByteView_t &bw);

    inline uint8_t drop_flag() { return m_drop_flag; }

private:
    uint8_t m_drop_flag;

};

extern utils::Object<WorkTask_t> workTask;

}


#endif
